package org.exteen;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

public class App {

    public static void main(String[] args) throws Exception {

        ExteenStreamFactory f = new ExteenStreamFactory();
        f.setNiceExteenIndentString(" ");
        ScriptParser sp = new ScriptParser();
        sp.setExteenStreamFactory(f);
        Script script = sp.parseResource("/template.xml");
        Map<String, Object> ctx = new HashMap<String, Object>();
        ctx.put("generated", new Date());
        ctx.put("what", "Hello World");
        script.compileTo(System.out, ctx);
    }
}